import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import axios from 'axios'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import './assets/js/rem'
import './assets/css/iconfont.css'
import './assets/css/rest.css'
import '../node_modules/swiper/swiper.min.css'
import {
  Button,
  Tabbar,
  TabbarItem,
  Icon,
  Swipe,
  SwipeItem,
  Tab,
  Tabs,
  List,
  PullRefresh,
  GoodsAction,
  GoodsActionIcon,
  GoodsActionButton,
  Popup,
  Card,
  Stepper,
  Sidebar,
  SidebarItem,
  Slider,
  Form,
  Field,
  Checkbox,
  CheckboxGroup,
  SubmitBar,
  SwipeCell,
  Dialog,
  Switch,
  Cell,
  CellGroup,
  Area,
  AddressList,
  ContactCard,
  Tag,
  Grid,
  GridItem,
  Uploader,
  Lazyload
} from 'vant'

import Loading from './plugins/Loading'

Vue.config.productionTip = false

Vue.use(ElementUI)
Vue.use(Button)
  .use(Tabbar)
  .use(TabbarItem)
  .use(Icon)
  .use(Swipe)
  .use(SwipeItem)
  .use(Tab)
  .use(Tabs)
  .use(List)
  .use(PullRefresh)
  .use(GoodsAction)
  .use(GoodsActionIcon)
  .use(GoodsActionButton)
  .use(Popup)
  .use(Card)
  .use(Stepper)
  .use(Sidebar)
  .use(SidebarItem)
  .use(Slider)
  .use(Form)
  .use(Field)
  .use(Checkbox)
  .use(CheckboxGroup)
  .use(SubmitBar)
  .use(SwipeCell)
  .use(Switch)
  .use(Cell)
  .use(CellGroup)
  .use(Area)
  .use(AddressList)
  .use(ContactCard)
  .use(Tag)
  .use(Grid)
  .use(GridItem)
  .use(Uploader)
  .use(Dialog)
  .use(Loading)
  .use(Lazyload, {
    loading: require('./assets/img/jiazai.jpg'),
    error: require('./assets/img/err.jpg'),
    preload: 1,
    attempt: 3
  })
Vue.prototype.$http = axios

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
